Data processing method and device

ABSTRACT

A data processing method for a data processing system having: a server comprising an application program constructed from a plurality of objects, an execution environment constructed from a plurality of objects for specifying operations of the application program and an application program interface for specifying an interface between the application program and the execution environment; and a client for being downloaded with the application program from the server, the data processing method comprising the steps of: 
     having the server execute a check whether or not the client has the execution environment for the application environment to be downloaded when the application program is to be downloaded to the client; and 
     having the server download the application program to the client in accordance with the results of the check.

This Application is a Divisional of application Ser. No. 08/678,288 filed Jul. 11, 1996.

BACKGROUND OF THE INVENTION

The present invention relates to a data processing method and device and more particularly to a low-cost data processing method and device of a simple structure.

Recently, personal computers have become widespread, with these personal computers being used to access prescribed servers via a network so that prescribed information can be obtained.

Application programs are necessary for carrying out various processes with these kinds of personal computers. Each user purchases application programs which can operate with the operating system (hereinafter referred to as “OS”) of their personal computer and installs and uses these application programs directly from a recording medium or via a communications line.

An idea for determining whether or not a client is appropriate while an application program is being installed via a communications line has been disclosed in Japanese Laid-open Patent No. Hei. 1-15253612. However, the object of this was to determine whether or not the user of the client computer is a regular user, with compatibility between the program and the computer not being determined in the related art at the time of installation of the program.

When OSs are different, the application program is also different, with each user then selecting and purchasing application programs in line with their own OS. The application providers (application designers) also then have to design a number (equal to the number of OSs) of application programs for carrying out what is essentially the same process, which involves a great deal of labor while at the same time increases costs.

A similar problem also occurs with application programs having the same OS. Namely, two application programs have to be designed separately even when both of these application programs are operating on the same OS when one of these application programs is different from the other application program. This makes the amount of effort and cost involved in providing a single application program high.

As the present invention sets out to resolve these kind of problems, it is the object of the present invention to provide single application programs simply and at a low cost independently of the type of computer.

SUMMARY OF THE INVENTION

According to the data processing method of the present invention, a server checks whether or not a client has an execution environment for an application environment to be downloaded when the application program is to be downloaded to the client and the server downloads the application program to the client in accordance with the results of the check.

Further, the application program is executed using a method for interpreting and executing the application program converted to intermediate code and a method for dynamically compiling the intermediate code and executing generated binary code. For example, when compiling is difficult, the intermediate code can be interpreted and executed gradually.

A data processing device of the present invention is provided with a checker for checking whether or not the client has an execution environment for the application program to be downloaded when the application program is to be downloaded to the client and a downloader for downloading the application program to the client in accordance with checking results of the checker.

This data processing device can further comprise a notifier for giving notification with relation to the execution environment for the application program to be downloaded when the application program is to be downloaded from the server and a downloader for downloading the application program from the server in accordance with the notification results of the notifier.

This data processing device can still further comprise a first executor for interpreting and executing the application program converted into intermediate code, a binary code generator for dynamically compiling the intermediate code and generating binary code and a second executor for executing the binary code and the system object. For example, when compiling is difficult, the intermediate code can be interpreted and executed gradually.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a view of an example system structure to which the data processing method of the present invention is applied;

FIG. 2 is a view showing a structure of an application program;

FIG. 3 is a view showing a structure of a concurrent object;

FIG. 4 is a view describing the downloading of objects from the server to clients of a plurality of vendors;

FIG. 5 is a view illustrating incremental downloading;

FIG. 6 is a view describing a meta-standard;

FIG. 7 is a view describing dynamic changing of an object;

FIG. 8 is a view describing dynamic expansion of an object;

FIG. 9 is a view describing the minimum functions of client;

FIG. 10 is a view describing the client environment structure suitable for an application and dynamic restructuring thereof;

FIG. 11 is a view describing a structure of a feature structure;

FIG. 12 is a view showing an example system structure to which the data processing device of the present invention is applied;

FIG. 13 is a view showing the logical structure of an MVM and an MK;

FIG. 14 is a view showing the logical structure of Context and Descriptor;

FIG. 15 is a view showing the overall structure of an MVM;

FIG. 16 is a view showing the data structure of Context and items surrounding Context;

FIG. 17 is a view showing the type of Variable table entry;

FIG. 18 is a view showing a primitive object list and interface name;

FIG. 19 is a view showing a primitive object interface;

FIG. 20 is a view showing a continuation of the primitive object interface in FIG. 19;

FIG. 21 is view showing a continuation of the primitive object interface in FIG. 20;

FIG. 22 is a view showing an I-code instruction set; and

FIG. 23 is a view showing an MK interface.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

First Embodiment

FIG. 1 shows an example of a system structure to which the data processing method of the present invention is applied. The system comprises a server 1 (data processing device), a client 2 (data processing device) and a network 3.

In this embodiment, the server 1 has two application programs 11-1 and 11-2. One of the application programs 11-1 has an execution environment 12-1 for defining the environment of execution of the application program 11-1 and an application program interface (hereinafter referred to as “API”) 13-1 comprising an interface between the application program 11-1 and the execution environment 12-1.

The application program 11-1 comprises a plurality of objects 14-1 and the execution environment 12-1 comprises a plurality of objects 15-1.

The application program 11-2 also has an execution environment 12-2 defining the environment for this application program 11-2 and an API 13-2 functioning as an interface between the application program 11-2 and the execution environment 12-2.

Further, the application program 11-2 also comprises a plurality of objects 14-2 and the execution environment 12-2 comprises a plurality of objects 15-2.

The client 2 also has two application programs 21-1 and 21-2. The application program 21-1 has an execution environment 22-1 for defining the environment for this application program 21-1, and an API 23-1 as an interface between the application program 21-1 and the execution environment 22-1. The application program 21-1 comprises a plurality of objects 24-1 and the execution environment 22-1 comprises a plurality of objects 25-1.

The application program 21-2 also has an execution environment 22-2 defining the environment for the application program 21-2 and an API 23-2. The application program 21-2 comprises a plurality of objects 24-2 and the execution environment 22-2 comprises a plurality of objects 25-2.

The objects are all defined as concurrent objects which are processed concurrently with other objects. A plurality of APIs exist between the server 1 and the client 2 because one API set can be considered as one execution environment.

As shown in FIG. 1 and FIG. 2, the application program 11 comprises a plurality of objects 14 gathered together. Further, execution speed is increased by having the application program 11 processed concurrently by constructing the object 14 as a concurrent object. Because the object 14 is a replacement unit, objects with operational bugs or objects with performance problems etc. can be replaced with objects which do not have errors. Problems of the objects 14 can therefore be resolved without having to remodel the whole of the application program 11. Further, a new application program can be easily made by taking the object 14 as a part and combining the object 14 with an object taken as a part of an already existing application program.

This application program is a single service unit, and can be, for example, an application program for; only displaying image data from the server 1; retrieving image data using an VCR function; selecting a service using a menu; home shopping; a family account book linked with home shopping; tax calculations, etc.

Operativity for common features can then be obtained by sharing application programs between objects. For example, an editor for inputting data to a family account book application program and an editor for inputting data in a home shopping program can be shared.

Next, a description of a concurrent object will be given, with the configuration of the concurrent object being shown in FIG. 3. The object 14 which is a concurrent object comprises a method entry table 14A open to the outside public, a method code 14B, a memory area 14C for holding the object conditions and a simple thread 14D for executing the method. Only one execution context (also referred to as a “thread”) exists at the concurrent object 14. The concurrent object 14 therefore receives one message and does not process messages arriving during the processing of this message until execution of this message which is currently being processed is completed.

Only providing one thread within the object has the following benefits.

(1) It is not necessary to be concerned about synchronization between a plurality of activities. Namely, it is no longer necessary to carry out such a process as to determine a sequence of access to the shared data using an instruction for synchronizing such as semaphore when shared data exists. In other words, the sequence of the message transmission to the object determines the sequence of access.

(2) As a result of this, program errors due to mistakes in the way of obtaining synchronization no longer occur and reusability of the object is improved.

(3) Synchronization errors can be prevented in a majority of cases by providing, for example, a device driver using this method.

(4) Device drivers can safely be replaced because synchronization errors due to replacing of the device drivers can also be prevented.

(5) Portions for the device driver other than portions for actually controlling the hardware can be provided independently from the OS. The program development period can therefore be made shorter because the amount of time taken up on program development for the device drivers can be shared.

(6) The description relating to execution control between objects can be removed from the description of the application program. For example, it is usually necessary for a thread execution control program to be incorporated within the application program with, for example, a method employing multi threads (when a plurality of threads are used). It is then necessary to rewrite the application program when the thread programming environment changes. However, if there is only one thread as in the present invention, it is not necessary to describe this portion at the application program. The application program therefore does not have to be rewritten even if the execution control method changes. The most appropriate execution control method for putting this concurrent object in this execution environment is provided by a system using dynamic expansion theory for objects.

(7) It is therefore not necessary to consider parallel processing when describing an application program. If concurrent objects are programmed, the system then carries out parallel processing with the hardware under the most appropriate execution control automatically after this because concurrent objects are the parallel processing units. In the related art, the generation of a number of processes or the generation of a number of threads had to be designated during programming. If this designation is made without taking into consideration the performance of the hardware, the application program then becomes dedicated to specific hardware.

With this system, the object is downloaded as necessary. An example of a system for downloading objects from the server 1 to the clients 2 of a plurality of vendors is shown in FIG. 4. Clients API 13 (13-1, 13-2) to be used by the respective vendors are realized by the execution environments 12 (12-1, 12-2).

When an object is downloaded to the client 2 (2-1, 2-2) it is determined whether or not an execution environment 22 (22-1, 22-2) the same as the execution environment 12 on the server 1 exists on the client 2. If the same execution environment does exist, the object is downloaded. If not, downloading is carried out after an execution environment 22 the same as the execution environment 12 on the server 1 is constructed.

For example, in FIG. 4, when the object 14-1 of the application program 11-1 of the server 1 is downloaded as the object 24-1 of the application program 21-1 of the client 2-1, an object 25-1A corresponding to an object 15-1A of the execution environment 12-1 of the server 1 is necessary at the execution environment 22-1 of the client 2-1. Then, for example, the object 15-1B (checking means) of the execution environment 12-1 interrogates the object 25-1B (notifying means) of the execution environment 22-1 for the feature structure (to be described later). The object 15-1C (downloading means) of the execution environment 12-1 and the object 25-1C (downloading means) of the execution environment 22-1 then download the objects 15-1A and 15-1B of the execution environment 12-1 as the objects 25-1A and 25-1B of the execution environment 22-1 in accordance with this response.

In the related method, it is necessary for the object to be downloaded to be provided taking into account the client API. For example, when the client is a UNIX system, the same UNIX system may be being used on the server or it may be necessary to provide an object constructed of some kind of cross-developed environment. If the server and the client have to be equipped with the same execution environment, the client device usually has to be equipped with expensive calculation resources. For example, more memory has to be provided when compared with the case where a dedicated execution environment is provided and a high speed CPU (Central Processing Unit) has to be provided to guarantee sufficient execution speed, with this increasing the cost of the device.

With regards to this, according to the system of the present invention, these problems are resolved by downloading an execution environment for the application program at the same time as downloading the application program. This is to say that by constructing just the execution environment 22 currently necessary at the client 2 at the client 2 unnecessary resources do not have to be prepared at the client 2. For example, if the client 2 does not require 3-D graphics then it is not necessary to prepare a library for this purpose.

Further, when a client is playing-back a movie image using VOD (Video On Demand), services (services which are not necessary when viewing movie images) for interacting with the user can be temporarily removed from the client with corresponding amount of calculation resources being able to be allotted to other work. These resources can then be used as a buffer for pre-fetch image data from the server 1. Services for interaction can then be downloaded from the server 1 when required.

The following have been considered as objects to be downloaded with the system of the present invention.

(1) All application programs.

(2) Device driver groups (for example, MPEG drivers, ATM drivers, image control drivers etc.) for controlling hardware resources provided by the client.

(3) Object groups (for example, VCR command management, stream management, real-time scheduler, memory management, window management, downloading control, communication protocol management, execution management etc.) providing system services for application programs.

The most appropriate execution environment for the application program can then be constructed on the client by combining these application programs and object groups.

The server 1 can be a device for transmitting image data and application programs or a device for transmitting information to the client 2 via the network 3. The client 2 is a device for processing information transmitted from the server 1 and it is not usually necessary for the client 2 to be connected to the network 3. The most appropriate execution environment can therefore be prepared for every application program because the execution environment is provided every application program.

In the related art, it is necessary to make preliminary estimate about the characteristics of the application program when constructing the system. For example, when the application program has to deal with image data, a system service equipped with a VCR-like user interface for handling real-time scheduling and image data is necessary. Further, if the application program uses 3-D graphics, a library for this purpose has to be provided and the system tends to be expanded. Typical examples are UNIX (trademark) or Windows (trademark), in which an amount of memory necessary for the system is increased each time its version is improved. With the system of the present invention, only a minimum of functions is provided for executing application programs and the problems of the systems of the related art are resolved.

By constructing an application program 11 as an assembly of a plurality of objects and by providing these objects as concurrent objects, concurrent execution is possible using each of the objects as a unit and the object can be downloaded at the same time as the application program is executed. At this time, by downloading the objects necessary in the execution of the application program incrementally as shown by the process in FIG. 5, the user can be made to feel as if the time it takes to download a single application had been much reduced.

For example, as shown in FIG. 5, when it is necessary to download objects 14-1-1 to 14-1-11 of the application program 11 of the server 1 as the objects 24-1-1 to 24-1-11 of application program 21 of the client 2, rather than downloading each object at random, objects 14-1-1 to 14-1-3 necessary first in the execution of the application program 21 are downloaded first as the objects 24-1-1 to 24-1-3.

If these three objects exist, the application program 21 can be activated and processing starts. While this processing is being executed, the remaining objects 14-1-4 to 14-1-11 are then sequentially downloaded in second to fourth steps as the objects 24-1-4 to 24-1-11 of the application program 21. These second to fourth downloads are also executed in the order of which object is necessary first.

When the objects 24-1-1 to 24-1-3 of the application program 21 are downloaded, the processing for the application program 21 has already been started. The user then can be made to feel as if all of the objects had been downloaded. The user therefore only has to be aware of the time necessary for downloading three objects, which is shorter than the time necessary for downloading eleven objects. In other words, the user is in practical terms not aware of the time for downloading eight of the objects, so that it is as if the time had been removed.

This can be also applied to the case of constructing the execution environment 22 described with reference to FIG. 4 (and also described later with reference to FIG. 10) on the client 2. In this case, the time for downloading all of the objects for the execution environment can be made to seem less to the user by first downloading only the objects necessary for executing the application program from the objects comprising the execution environment 22. This method can also be applied to the booting of the system.

Here, incremental downloading means downloading the application program or execution environment in units of objects or portions thereof comprising the application program or execution environment as necessary rather than downloading at one time. When application programs are downloaded in conventional personal computer communications, compressed application programs are downloaded at one time. The application program can therefore not be used until downloading has completely finished. Further, with, for example, system booting, up until now, start-up would take place from when all of the system had been read into memory. In the case of a UNIX disc-less workstation, the system does not start-up until all of the OS has been read-into memory from the server so that the system can therefore not be used until reading-out is completed. This is not the case, however, if incremental downloading is used.

This method is successfully applied to a server 1 and a Set Top Box (hereinafter referred to as “STB”) taken as client 2 as follows. First, it is no longer necessary to wait impatiently until the system starts up as is the case for current personal computers because the STB can soon be used after turning on the power supply. As an STB is extremely prominent as a household electrical appliance, it is not desirable to have to make the user wait until the system starts up.

When the STB is turned on, the STB downloads and starts to execute the objects necessary first. The time the user has to wait will then be just the time taken to initially download these objects. The typical time for downloading an object is a few milliseconds to a few tens of milliseconds. This time can therefore be made to be insignificant to the user by using an appropriate user interface. The necessary objects are then downloaded concurrently with the activation of the system as the activation processes for the system proceed.

Limitations also occur when executing a plurality of application programs at the same time because plenty of calculation resources such as for the server 1 are not prepared at the client 2. For example, in the case where a VOD service is selected by a navigation application program for appreciation of a movie, resources (memory) occupied by the navigation application program can be used for the movie appreciation application once appreciation of the movie has started. These resources (the object for managing the memory) can then be downloaded again at the time when the navigation application again becomes necessary.

The “time when necessary” is the time when a message is sent with regards to the object. Namely, when the very first object downloaded sends a message to another object, this object that received the message is downloaded. The object sending the next message can then be downloaded beforehand by utilizing object interdependence and reference relationships. By carrying this out concurrently with execution of the application program, delays due to downloading at the time of message communications can then be made small. This then increases the efficiency of the incremental downloading.

The execution environments 12 and 22 are also assemblies of the objects 15 and 25 and the same operations as for the objects 14 and 24 of the application programs 11 and 21 are possible. A meta-object for controlling the downloading sequence specialized for the application programs 11 and 21 can therefore be prepared as one of the objects 15 and 25 (for example, the object 25-1C of FIG. 4 is taken as an meta-object). In this way, a download sequence of an object that the above object utilizes can be appointed as being suitable for a specific application and the time a user has to wait can be minimized using incremental downloading.

A function for downloading objects from the server 1 to the client 2, an accompanying function for checking compatibility of execution environments of the objects and a function for constructing execution environments are necessary to realize this system. These are taken as the basic functions for all of the devices (clients 2) provided in this system to have. In this specification, this function is referred to as a meta-standard. The API of the execution environment of the OS etc. can be freely expanded with this meta-standard. The minimum standardization together with this expansion then will allow the API to comply with all types of applications from now on.

For example, with the system shown in FIG. 6, an OS having independent APIs is being operated at each of the servers 1-1 and 1-2 and each of the clients 2-1 and 2-2. Namely, an API 23-1 (API #1) for the application program 21-1 is constructed at the client 2-1 so as to correspond to the execution environment 22-1. Further, an API 23-2 (API #3) for the application program 21-2 for the execution environment 22-2 is constructed at the client 2-2.

Because of this, APIs which correspond to these APIs is already prepared at the server that downloads the programs to the clients 2-1 and 2-2. In this embodiment, an API 13-1 for the application program 11-1 is constructed at the server 1-1 for the execution environment 12-1. This API 13-1 is taken to be the API (API #1) corresponding to API 23-1 (API #1) of the client 2-1.

Similarly, API 13-3 (API #3) corresponding to the application program 11-3 is formed at the execution environment 12-3. This API 13-3 is corresponds to API 23-2 (API #3) of the client 2-2.

Objects 15-1A to 15-1C, 15-3A to 15-3C, 25-1A to 25-1C and 25-2A to 25-2C are provided as objects corresponding to this meta-standard at the servers 1-1 and 1-2 and the clients 2-1 and 2-2. As a result, necessary objects can be properly downloaded from the servers 1-1 and 1-2 to the clients 2-1 and 2-2 according to the metal-standard protocal.

To standardize the OSs of the clients into a single OS has been the tendency in this field. However, as a result of defining meta-standard as above and providing APIs corresponding to each of the client APIs only on the server side, it becomes no longer necessary to decide a standard.

As a result of not stipulating one OS standard, the object realizing the system service including the application program can be constructed independently of the OS. Namely, software written for a certain execution environment can automatically be restructured for another separate execution environment using migration. This function has not been provided in conventional systems. For example, software written for UNIX will not operate on a Windows platform without being re-written. In order to realize this function with application level software, software capable of eliminating this software dependence is necessary. However, OS independence of objects for realizing system services including device drivers become possible using this method.

By downloading objects in this way, the object of the client 2 is changed as necessary as shown in FIG. 7, i.e. an already-existing object is removed from the client and a new object is downloaded from the server.

For example, with the embodiment of FIG. 7, the object 24A of the application program 21 of the client 2 has become unnecessary and is therefore removed. A new, necessary object 14A is then downloaded to the client 2 from the server 1.

In this way, the following becomes possible.

(1) The software can be updated. For example, when a bug is found in hardware control software, this object can be removed and can be replaced with a new object. Household electrical appliances equipped with computers are used by general consumers who are not computer specialists and software updating using an installer performed in some of computers is not appropriate. Updating of software in the way of the present invention is therefore extremely effective.

(2) The product cycle can be made long. For example, models of television receivers are changed every year, but general consumers cannot buy a new television receiver every year. However, with the system of the present invention, the newest software functions can be provided to the user without having to change the television receiver and model changing of the receiver due to software function expansion is no longer necessary. This is also applied to STBs.

(3) Compliance with changes in requirements for user interfaces can be provided. For example, a user-friendly menu can be provided when the user first starts to use the device, with this then being changed to a more directly operated user interface when the user has got used to using the device. However, both procedures are not necessary to be brought over to the client side. Rather, the user interface matched the skill of the user at the time can be brought over to the client side. In this way, limited client resources can be effectively utilized.

Further, a downloaded object can expand the object of the client 2 as necessary as shown in FIG. 8. In the embodiment of FIG. 8, an execution environment 22-2 for receiving a new service is generated for the object 24-1B of the application program 21-1 at the client 2. The necessary objects 25-1A and 25-1B are then migrated (shifted) from the execution environment 22-1 so as to become the objects 25-2A and 25-2B at the execution environment 22-2. Other necessary objects 25-1C and 25-1D are also migrated to the execution environment 22-2.

To the application program 21-2, the object 24-1B of the application program 21-1 is migrated to become the object 24-2B.

In this way, for example, a new execution environment for the necessary expansion of real-time scheduling is generated at the client and necessary objects are shifted over to the new environment. The object can therefore be made capable of receiving a real-time scheduling service without necessitating any changes.

The following results are obtained as a result of this.

(1) New functions can be dealt with without having to add any changes to application program objects. The application program life therefore becomes longer and reusability is improved. In the related method, changing of the execution environment meant the re-writing of the application program because dependent code for the execution environment was included in the application program.

(2) With regards to application programs included in the equipment, highly functional control software for the equipment including the user interfaces is the part wished to be re-used unless the model of the equipment is not largely changed or to have shortened development periods only by expanding software functions using already existing code. However, if the part includes code dependent on the execution environment, the work involved in re-utilization becomes complicated. With methods up until now, no countermeasures were taken for utilization of the part, but with the method of the present invention this work is made to be either automatic or minimal.

The system of the present invention can be applied specifically in the following way.

(1) Halting of the whole system can be prevented by downloading a memory protection function when the reliability of the application program is low.

(2) Services provided by service provider can be changed every STB vendor. For example, a service provider providing a movie of movie company A can change the characteristics of the image to be transmitted according to whether the image is received by the STB of company B or the STD of company C.

(3) The processing method of the system can be changed in accordance with the compression method of audio-visual data sent to an STB or the picture quality requested by the user. For example, the method taken when adjusting picture quality is different for MPEG data and JPEG data and it has therefore been necessary to change the processing method of the system. However, with the system of the present invention, the processing method is selected as necessary in accordance with the data format.

It is therefore not necessary for the client 2 to provides various functions beforehand because most of the functions for the system can be downloaded from the server 1 and the client 2 is therefore made to only provide a minimum of functions needed. FIG. 9 shows the minimum of functions possessed by the client 2 of the system of the present invention. An execution environment 22-1 for the device driver, an execution environment 22-2 for the system object and an execution environment 22-3 for the execution environment are formed at the client 2 as minimum functions.

The device drivers necessary for being existed beforehand are an object 24-1A taken as an input driver for processing input, an object 24-1B taken as a timer driver for managing time and an object 24-1C taken as a screen driver for controlling displaying. The system objects are an object 24-2A taken as an input handler for managing input, an object 24-2B taken as boot protocol for managing activation, and an object 24-2C taken as a memory manager for managing memory. A more highly functional device drivers or system objects can be downloaded from the server 1.

FIG. 10 shows an embodiment of a dynamic structure of client environments suitable for application programs (video, game, shopping, etc.) sent out from the server. In FIG. 10, an execution environment 22-4 for shopping use is constructed on the client 2-2 so that a shopping application program 11-2 can be downloaded from the server 1. Further, when the client 2-2 changes the application program over from the shopping application program to a movie application program, an execution environment 22-3 for a movie application program 21-3 is constructed on the client 2-2 and the movie application program 11-1 is downloaded from the server 1.

For example, the following process can be considered.

(1) When a user selects a movie.

At this time, a navigation application 11-3 is downloaded from the server 1-2 to, for example, the execution environment 22-1 of the client 2-1 so that the desired movie can be selected and an object 15-3 for window management and for managing inputs from the user etc. is downloaded as an object 25-1 as the necessary environment for the navigation application 11-3.

(2) When a user is enjoying a movie.

At this time, an object 15-1 for video stream management, data pre-read buffer management and VCR functions etc. is downloaded from the execution environment 12-1 of the server 1-1 to, for example, the execution environment 22-3 of the client 2-2 as an object 25-3.

In the system of the present invention, the feature structure shown in FIG. 11 is introduced in order to present the execution environment of the client by downloading. This feature structure is checked when objects are downloaded from the server 1 to the client 2 and the necessary execution environments are constructed where the objects are downloaded.

First, the server 1 carries out a negotiation with the client 2 in a first phase (negotiation phase) for the possibility of an object migration between meta-object space of the server 1 and meta-object space of the client 2. In a second phase (transferring phase) the object is then actually transferred.

Object migration is a meta-level process which transmits the calculation resources in-use using internal information of the object and objects related to this object if necessary. The internal information of the object is expressed by a meta-level object referred to as a descriptor. In reality, the descriptor holds the name of the meta-object managing the object. A typical descriptor holds the name of the meta-object managing memory segments for the object, the name of the meta-object performing execution control of two or more objects (scheduler) and the name of the meta-object managing the giving of names to objects, etc.

A check is made in the first phase (negotiation phase) for the possibility of shifting object. In some meta-object spaces, object migration is not desirable. For example, if an object (device driver) is shifted in a meta-object space for managing a device driver, this shifting becomes actually meaningless if a hardware device does not actually exist at the client 2. Further, a meta-object managing memory segments of the object using a virtual memory management structure cannot manage the memory segments even by carrying out shifting if a virtual memory management structure does not exist where the objects are shifted. The following method is therefore prepared for the migration protocol.

Feature* Descriptor::CanSpeak (Feature* pFeature).

In this method, a CanSpeak operation is executed for the descriptor within the meta-object space at the client 2.

At this time, a feature structure is passed from the server 1 as an argument. As a result, the client 2 returns a feature structure to the server 1 indicating that acceptance at the client 2 is possible. The server 1 then checks the feature structure returned from the client 2 so as to be able to know in which categories given below the compatibility of this meta-object space is included.

Compatibility can be classified into three categories, completely compatible, partially compatible and incompatible.

Complete compatibility means that the object can be completely executed even after being shifted. Partial compatibility means that some restrictions are put on execution of the object after being shifted. Incompatibility means that the object cannot be continued to be executed after being shifted.

Object migration is not carried out in the case of incompatibility. In the case of partial compatibility, whether or not migration is carried out is decided by the user. In reality, an exception is sent back to the user and a migration decision is made using the exception process routine. In the case of complete compatibility or partial compatibility when object migration can be carried out, migration is carried out in accordance with the contents of the feature structure returned previously.

Before the negotiation phase, an empty descriptor is generated at the meta-object space of the client 2 by the next operation.

Descriptor::Descriptor( )

The previous CanSpeak method can be forwarded for this descriptor. At this time, necessary meta-object generation, reference generation and listing of necessary information are carried out on the basis of the feature structure information.

The process at the meta-level of the second phase is the shifting or transmitting of the meta-object corresponding to the transmitted descriptor. Here, shifting of the meta-object is the entering of this meta-object to the meta-object space of the client 2, i.e. being referenced from the descriptor. Further, transmitting of the meta-object means transmitting the data within the meta-object as a message for the meta-object (which is referenced from the descriptor) present at the meta-object space at the client 2.

The actual operation relating to the shifting and transmitting of the meta-object is executed in this second phase (shifting phase) utilizing the feature structure obtained by the negotiation phase.

The actual transferring and transmitting of the meta-object in the shifting phase is activated by the following method.

Descriptor & Descriptor::operator=(Descriptor & source)

The descriptor class is an abstract class which defines a common protocol relating to the shifting and transmitting of the meta-object. The contents of the descriptor referenced using the source are copied to this descriptor.

The actual procedure can be defined as a subclass of the descriptor class.

The next method is a method relating to transmitting of the meta-object. These protocols are mainly used by a migrator (a meta-object included within the meta-object space for carrying out object migration).

CanonicalContext& Context::asCanonical( )

Converting a machine-dependent Context structure to a machine-independent form. This protocol is executed when the feature structure indicates that a direct conversion of Context is not possible.

Context& Context::operator=(Context& source)

Context& Context::operator=(CanonicalContext& source)

The Context currently referenced by this is initialized using the Context referenced by source.

CanonicalSegment & Segment::asCanonical( )

Converting a machine-dependent Segment structure to a non-machine-independent form. This protocol is executed when the feature structure indicates that a direct conversion of Context is not possible.

Segment& Segment::operator=(Segment& source)

Segment& Segment::operator=(CanonicalSegment& source)

The Segment currently referenced by this is initialized using the Context referenced by source and the necessary region of memory is copied.

FIG. 11 shows the configuration of the feature structure. As shown in FIG. 11, pointers of the object description and the environment description are described in the entry.

An object name, a pointer of the same structure as for the structure indicated by the pointer of the environment description and the resource requirement of this object are described at the structure indicated by the pointer of the object description.

Further, an environment name, resource information of client hardware, resource requirement of this environment and list of meta-objects constituting the execution environment are described at the structure indicated by the pointer of the environment description.

A specific example of the contents of a feature structure is as follows.

(1) Information relating to the object.

real time processibility

amount of required processor

(2) information relating to meta-object

hardware meta-object

*processor type

*data format

segment meta-object

*size

*expandability, compressibility

*management principle

*layout

context meta-object

*register information

*number of temporary variables

*processor conditions

mailer meta-objects

*message cue length

*number of available processor messages

*necessity of external mailer

*message transmission method

external mailer meta-object

*message cue length

*number of available processor messages

*protocol

scheduler meta-object

*object conditions

*scheduling principle

management-dependent meta-object

*number of external names possessed

As described above, when each of the clients have different OSs, the OSs of each of the clients are determined from this feature structure and the server then downloads objects corresponding to these OSs.

FIG. 12 shows an example of a system structure to which the data processing system of the present invention is applied. A core 31 of this system comprises a Micro Virtual Machine (MVM) 31 a (first execution means) and a Micro Kernel (MK) 31 b (second execution means). The MVM 31 a interprets and executes intermediate code (I-code) to be described later and can called-up a personality object (system object) using the functions of the MK31 b as necessary.

Portions other than the core 31 shown in FIG. 12 can, for example, be downloaded from the server 1 using the aforementioned methods.

This system dynamically compiles I-code into native code (binary code, machine code) as necessary. Objects already compiled in native code can be executed but in this case, the personality object 33 (binary code generating means) is called-up using the functions of the MK 31 b and provides a service to the applications 35.

The MVM 31 a and the MK 31 b comprising the core 31 shown in FIG. 12 are surrounded by device driver objects (Device drivers) 32 and Personality objects (Personality component objects) 33, which are in turn surrounded by a class system (Class Libraries) 34 prepared for carrying out application programming, which are in turn surrounded by application programs 35.

The layer of personality objects 33 allows this system to provide various OSs or virtual machines. For example, execution of BASIC programs is carried out by executing intermediate code obtained by compiling the BASIC program using personality objects for BASIC programming.

In the system of the present invention, programs are compiled to I-code (intermediate code) for managing the object method so as to obtain a high degree of portability. Although I-code is not designed on the presumption of being interpreted and executed (executing the program while interpreting the program), but is designed to be compiled as necessary into native code. However, the MVM interprets and executes the I-code when dynamic compiling of the I-code is difficult due to various limitations.

However, in most cases the I-code is compiled into native code and directly executed by a CPU constructed within the system. Deficiencies in real time processibility or loss of processing speed accompanying Virtual Machine execution is therefore negligible.

The I-code comprises two instruction sets (OP_M, OP_R) of sufficiently high abstractness, to be described later with reference to FIG. 22 so as to give a high degree of Inter-Operability. The semantics (the structure of meanings) of these instruction sets is strongly related to the interface of MK31 b. This is to say that the instruction sets are under the strong influence of the structure of the system of the present invention shown in FIG. 12. The system of the present invention therefore has a high degree of Portability and Inter-Operability in spite of assumption of the native code.

Next, the method for the MVM 31 a and the MK 31 b is described.

First, the data structure assumed by the MVM 31 a and the I-code format are stipulated.

FIG. 13 shows the logical structure of the MVM 31 a and the MK 31 b shown in FIG. 12. The logical structure of both the MVM 31 a and the MK 31 b is basically the same, with both comprising an active context 41, a message frame 42 and an execution engine 43. However, the MVM 31 a supports execution using I-code and the MK 31 b supports execution using native code.

In FIG. 13, active context 41 points to the Context (described later with reference to FIG. 14) currently being executed and the message frame 42 points to the main part of the message for the MVM 31 a and the MK 31 b comprising the core 31.

In the case of MK 31 b, the place where the main part of the message exists depends on the implementation system with there being cases where this place is allotted to memory as a stack frame, allotted to a heap or allotted to registers of a number of CPUs. On the other hand, in the case of MVM 31 a, the message frame points to an operand following the instruction code. Internal registers other than these registers may also be necessary depending on the implementation but these registers are independent of this method.

In FIG. 13, the execution engine 43 executes I-code and native code. Further, primitive objects 44 are included at the execution engine 43 of the MVM 31, with these primitive objects 44 being code for processing primitive objects to be described later with reference to FIG. 18.

FIG. 14 shows the logical structure of the Context and Descriptor. The context structure 51 showing one execution state of the program comprises the fields of object, class, method and meta-etc., with further fields of icode and minf being provided at the field method. This Context structure 51 holds the state of MVM 31 a, corresponds to a CPU register, and is completely independent of the memory management and systems of communicating between programs etc.

The Context structure 51 is a Context primitive object, with each field being linked with prescribed information, as described later with reference to FIG. 16. Further, the Context structure 51 is deeply dependent on the implementation of the core 31 (MVM 31 a and MK 31 b) but only portions which are not dependent are shown in FIG. 14.

The important field at the Context structure 51 is the meta-field, with this field pointing to the Descriptor structure 52. The entries for the Descriptor structure 52 consist of three groups, #tag, context and select, with the API of the Personality object 33 being decided by this descriptor structure 52. Here, #tag expresses the API name and addresses of the API are expressed by context and selector.

FIG. 15 shows the whole structure of the MVM 31 a. Basically, all of the necessary information can be referenced by following links from the Context structure 51. Namely, the Context structure 51 is linked to the object 61. This object 61 comprises a link (class pointer) to a class corresponding to the object 61 and an instance region (object dependent field). What kind of information is stored at the instance region or in what manner this information is laid-out depends on the implementation of the object.

The class 62 mainly holds the method. The class 62 comprises the name (class name), the portion depending on the conditions of implementation (class dependent field) and the link table (method table) to the I-method structure 63. The I-method structure 63 is the block primitive object and comprises a header (Header), an Icode and a variable table (variable table). Further, magic# is the management number (ID) of the MVM 31 a. Basically, the I-code instruction operand refers to the target object via this variable table entry.

In FIG. 15, the gray portions (Context 51, I-method 63) are portions depending on the MVM 31 a and are structures required when the MVM 31 a translates and executes the I-code.

FIG. 16 shows structures linking-out from the Context structure 51. The object field of the Context structure 51 points to the object 61 and the class field points to the class-dependent field of class 62, with the icode of this method field pointing to the I-code of the I-method 63. The icode corresponds to the program counter and points to the program being executed. Further, vtable of the method field points to the variable table of the I-method 63.

The temporary field points to a region for temporarily saving data and the meta-field points to the descriptor 52 described above. Moreover, the class pointer of the object 61 points to class 62 and the method table of the class 62 points to I-method 63.

The variable table entry is a group consisting of type and value, with the value depending on the type.

The MVM 31 a processes the type as shown in FIG. 17. When the type is T_PRIMITIVE, the value field refers to a primitive object. The kind of group of <P_CLASS, P_BODY>shown in FIG. 18, such as, for example, <P_INTEGER, immediate>, <P_STRING, address to heap> is stored at the value field. FIG. 18 shows the primitive object list together with the name of interface (listed in the column of P_CLASS). FIG. 19 to FIG. 21 show an example of the primitive object interface shown in FIG. 18 described using an Interface Definition Language (IDL) method. This IDL method is disclosed in “COBRA V2.0, July 1995, P3-1 to 3-36”.

In FIG. 17, an ID for referring to the object is stored in the value field when the type is T_POINTER. This ID is the only value within the system with its position being independent. An object position corresponding to the ID is then specified by a personality object 33.

FIG. 22 shows two instruction sets interpreted and executed by the MVM 31. In the structure of FIG. 12, the instruction set OP_M is instructions entering from outside to inside and the instruction set OP_R is instructions returning from inside to outside.

Namely, the instruction set OP_M executes the operation indicated by this first operand. This operation is processed by Personality object 33 or by a primitive object. Further, the compiler generates I-code in order to execute the applications 35 in a more efficient manner as a number of processes are processed by the primitive object. In this way, for example, the arithmetic operation for integer is processed by the leading primitive object of FIG. 18.

Next, the interface of MK 31 b is specified. FIG. 23 shows the interface of the micro kernel (MK) 31 b. The logical structures of the MVM 31 a and the MK 31 b are the same as that shown in FIG. 13. Here, MK 31 b processes the instruction sets OP_M and OP_R shown in FIG. 22 as a system call.

The system constructed in the way described above can be applied to, for example, the client 2 (2-1, 2-2) shown in FIG. 4. The execution environment most suitable for executing a prescribed application can then be constructed on the client 2 by downloading an arbitrary portion of the portions other than the core 31 shown in FIG. 12 from the server 1.

As described above, the following can be considered as objects to be downloaded.

(1) All application programs.

(2) Device driver groups (for example, MPEG drivers, ATM drivers, image control drivers etc.) for controlling hardware resources provided by the client.

(3) Object groups (personality objects) providing system services for application programs (for example, VCR command management, stream management, real-time scheduler, memory management, window management, downloading control, communication protocol management, execution management etc.) providing system services for application programs.

The most appropriate execution environment for the application program can then be constructed on the client by combining these application programs and object groups.

For example, when it is wished to execute a BASIC program, the personality object 33 for BASIC and the BASIC program (application) 35 are downloaded from the server 1. This system is capable of providing a BASIC Virtual Machine using this personality object 33. The downloaded BASIC program is then temporarily compiled into intermediate code by the compiler and executed by the BASIC Virtual Machine. The BASIC program can alternatively be executed after having been compiled into native code in the way described above.

In the aforementioned embodiment, downloading of a prescribed object was carried out from the server to the client. However, the present invention can also be applied to downloading of objects from a prescribed client to a prescribed server or to downloading of objects between servers or between clients.

Further, in the aforementioned embodiment, the I-code comprises two instructions, but the present invention is by no means limited in this respect.

According to the data processing method and data processing device of the present invention, a check is made as to whether or not the client has the execution environment of the application program to be downloaded and the application program is then downloaded to the client on the basis of this check. The structure of the client can therefore be simplified and the cost can be reduced. This makes the providing of cheap application programs possible.

Moreover, with the data processing device of the present invention, notification is given to the server with regards to the execution environment for the application program to be downloaded, with the application program then being downloaded from the server on the basis of this notification. This makes low-cost devices with simplified structure to be feasible and also makes the providing of low-cost application programs possible.

With the data processing device and data processing method of the present invention, an application program converted into intermediate code is interpreted and executed, or intermediate code is dynamically compiled and the generated binary code is executed. Intermediate code can therefore be gradually interpreted and executed when dynamic compiling is difficult. Still further, portable applications can be constructed by giving the intermediate code a simple structure. 

What is claimed is:
 1. A data processing device having an application program constructed from a plurality of objects and a system object constructed from a plurality of objects providing an execution environment for said application program, said data processing device comprising: converting means for converting said application program into intermediate code; binary code generating means for dynamically compiling said intermediate code and generating binary code; second execution means for executing said binary code and said system object, wherein first execution means is activated if dynamic compiling of said intermediate code by said binary code generating means is not performed; and first execution means for interpreting and executing said application program converted into intermediate code if it is determined that dynamic compiling of said intermediate code by said binary code generating means has a high compiling difficulty level.
 2. The data processing device according to claim 1, wherein said first execution means executes said system object via said second execution means.
 3. The data processing device according to claim 1, further comprising: a first structure showing execution conditions of said application program, and a second structure for deciding an application program interface for said execution environment provided by said system object, said first execution means and said second execution means controlling execution of said application program on the basis of said first structure and said second structure.
 4. A The data processing device according to claim 1, wherein said first execution means has a first instruction issued by a prescribed item of said object for performing a prescribed operation designated by a prescribed operand, and a second instruction for returning control to said object that issued said instruction after said operation has been executed.
 5. A data processing method having an application program constructed from a plurality of objects and a system object constructed from a plurality of objects providing an execution environment for said application program, said data processing method comprising the steps of: converting said application program into intermediate code; dynamically compiling said intermediate code and generating binary code; second executing said binary code and said system object, wherein first executing is activated if dynamic compiling of said intermediate code by said binary code is not performed; and interpreting and second executing said application program converted into intermediate code if it is determined that dynamic compiling of said intermediate code by said binary code has a high compiling difficulty level.
 6. The data processing method according to claim 5, wherein said first executing executes said system object via said second executing.
 7. The data processing method according to claim 5, further comprising the steps of: showing execution conditions of said application program in a first structure, and deciding an application program interface for said execution environment provided by said system object in a second structure, said first executing and said second executing controlling execution of said application program on the basis of said first structure and said second structure.
 8. The data processing method according to claim 5, wherein said first executing has a first instruction issued by a prescribed item of said object for performing a prescribed operation designated by a prescribed operand, and a second instruction for returning control to said object that issued said instruction after said operation has been executed. 